package sfeir.gwt.ergosum.client.model;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

//@XmlRootElement
public class Person implements Serializable {

    private static final long serialVersionUID = -5348634263603835324L;

    private long _id;

    private String alias;
    private String name;
    private String firstname;
    private String nickname;
    private String birthDay;
    private int timeZone;
    private GeoLocalisation geo;
    private String title;
    private String aboutMe;
    private String company;

    private String url;

    private ImageURL photo = new ImageURL();
    private List<Email> emails;
    private List<Address> addresses;

    private List<Tel> tels;

    private List<NetworkItem> networkItems;

    public Person() {
        emails = new ArrayList<Email>();
        addresses = new ArrayList<Address>();
        tels = new ArrayList<Tel>();
        networkItems = new ArrayList<NetworkItem>();
    }

    public Person(String firstname, String lastname) {
        this();
        this.name = lastname;
        this.firstname = firstname;
    }

    public String getFirstname() {
        return firstname;
    }

    public void setFirstname(String firstname) {
        this.firstname = firstname;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getNickname() {
        return nickname;
    }

    public void setNickname(String nickname) {
        this.nickname = nickname;
    }

    public String getBirthDay() {
        return birthDay;
    }

    public void setBirthDay(String birthDay) {
        this.birthDay = birthDay;
    }

    public int getTimeZone() {
        return timeZone;
    }

    public void setTimeZone(int timeZone) {
        this.timeZone = timeZone;
    }

    public GeoLocalisation getGeo() {
        return geo;
    }

    public void setGeo(GeoLocalisation geo) {
        this.geo = geo;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getAboutMe() {
        return aboutMe;
    }

    public void setAboutMe(String aboutMe) {
        this.aboutMe = aboutMe;
    }

    public ImageURL getPhoto() {
        return photo;
    }

    public void setPhoto(ImageURL photo) {
        this.photo = photo;
    }

    public List<Email> getEmails() {
        return emails;
    }

    public void setEmails(List<Email> emails) {
        this.emails = emails;
    }

    public List<Address> getAddresses() {
        return addresses;
    }

    public void setAddresses(List<Address> addresses) {
        this.addresses = addresses;
    }

    public List<Tel> getTels() {
        return tels;
    }

    public void setTels(List<Tel> tels) {
        this.tels = tels;
    }

    public List<NetworkItem> getNetworkItems() {
        return networkItems;
    }

    public void setNetworkItems(List<NetworkItem> networkItems) {
        this.networkItems = networkItems;
    }

    public long getId() {
        return _id;
    }

    public void setId(long _id) {
        this._id = _id;
    }

    public String getCompany() {
        return company;
    }

    public void setCompany(String company) {
        this.company = company;
    }

    public String getFullName() {
        return this.firstname + " " + this.name;
    }

    @Override
    public String toString() {
        return "Person[" + getFullName() + "]";
    }

    public void setAlias(String alias) {
        this.alias = alias;
    }

    public String getAlias() {
        return alias;
    }
}
